home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-05 / chkcd10.zip / CHKCD10.DOC < prev    next >
Text File  |  1992-07-23  |  3KB  |  77 lines

  1. Program:        Check CD (CHKCD)
  2. Version:        1.0
  3. Author:         George Spafford
  4. Date:           07/23/92
  5.  
  6. Purpose:
  7.  
  8. To quickly identify whether there is a carrier or not on a specified
  9. comm port and to pass this result to DOS via the DOS ERRORLEVEL to
  10. facilitate the batch programming required in large communication installations
  11. such as a BBS.
  12.  
  13. Procedure:
  14.  
  15. Put CHKCD anywhere in a batch file when you need to test for the carrier.  For
  16. example, I check for carrier in batch files to decide whether to operate a 
  17. program in local or remote modes.  Use CHKCD as follows:
  18.  
  19.         CHKCD CommPort
  20.         
  21.               CommPort is the one comm port that you want to check.  It can be
  22.                        comm port 1, 2, 3, or 4.  For example:
  23.                        CHKCD 2    <- tests COM2
  24.                        
  25. The carrier test is nondestructive & it will not drop DTR when it runs.  Here is
  26. an example of CHKCD in a sample batch file:
  27.  
  28.    :FFAM
  29.      CHKCD 1                                ;check for carrier on COM1
  30.      If errorlevel = 1 goto FFRMT           ;if carrier then run as remote
  31.      If errorlevel = 0 goto FFLCL           ;if no carrier run locally
  32.      goto RELOAD
  33.           
  34.    :FFRMT
  35.      CTTY COM1                              ;redirect through COM1
  36.      FIDO-FAM flsearch.ctl <COM1 >COM1      ;run program and redirect to COM1
  37.      CTTY CON                               ;return control to console    
  38.      goto RELOAD
  39.           
  40.    :FFLCL
  41.      FIDO-FAM flsearch.ctl
  42.      goto RELOAD
  43.      
  44.    :RELOAD    
  45.           
  46. By testing COM1 in the :FFAM label, we can determine how to run the application.
  47. If CHKCD returns an errorlevel of 1 then it has established that there is a 
  48. carrier and that the application should be run in remote mode (:FFRMT).  
  49. On the other hand, if the errorlevel is 1, then no carrier was found and the
  50. application should be run locally (:FFLCL). 
  51.           
  52. CHKCD is shareware.  As such, you can use CHKCD for 30 days.  If you continue to
  53. use the program after this period, you must register it in order to continue
  54. using it legally.  CHKCD is $10 per copy.  If you are running a multi-node BBS
  55. that has the same name on all nodes, then you only need to register one copy.
  56. Otherwise, you must register each copy of CHKCD that you use.
  57.  
  58. Please make payments in US Currency (no cash please) to:
  59.  
  60.         George Spafford
  61.         3001 Lakeshore Drive #329
  62.         Saint Joseph, MI 49085
  63.         
  64. Comments and/or questions are always welcome.  I can be reached via the mail,
  65. EXEC-PC or Queued Access:
  66.  
  67.         Queued Access BBS:  (616) 468-5026  USR Dual Std  19200-8-N-1
  68.  
  69.  
  70. CHKCD IS DISTRIBUTED AS IS.  THE AUTHOR (GEORGE SPAFFORD) MAKES NO WARRANTY OF 
  71. ANY KIND, EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF 
  72. MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, WITH RESPECT TO THIS
  73. SOFTWARE AND DOCUMENTATION. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 
  74. DAMAGES, INCLUDING LOST PROFITS, LOST SAVINGS, OR ANY OTHER INCIDENTAL OR 
  75. CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF OR THE INABILITY TO USE THIS 
  76. PROGRAM.
  77.